package com.game.main;

import com.game.view.GamePanel;
import com.game.view.LoginPanel;

import javax.swing.*;
import java.awt.*;

public class GameMain {
    public static void main(String[] args) {

        JFrame frame = new JFrame();
        frame.setLayout(new CardLayout());  // 设置多界面布局
        GamePanel gamePanel = new GamePanel();
        LoginPanel loginPanel = new LoginPanel();
        gamePanel.setFrame(frame);
        loginPanel.setFrame(frame);
        frame.add(loginPanel,"loginPanel");
        frame.add(gamePanel,"gamePanel");

        frame.setBounds(200,100,800,600);
        frame.setVisible(true);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    }
}
